const std = @import("std");

const mp = @import("mp.zig");
const ext = @import("ext.zig");

const MAX_CMD_LEN = 255;

pub fn main() anyerror!void {
    var in = std.io.getStdIn().reader();

    while (true) {
        const len = try mp.decodeExtLength(in);
        const extype = try in.readByte();

        try ext.handle(extype, len, in);
    }
}
